package com.example.controller;

import com.example.common.Result;
import com.example.entity.Outdepot;
import com.example.service.OutdepotService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/outdepot")
public class OutdepotController {
    @Resource
    private OutdepotService outdepotService;

    @PostMapping
    public Result add(@RequestBody List<Outdepot> outdepot){
        outdepotService.saveAll(outdepot);
        return Result.success();
    }

}
